package com.fanxuankai.boot.upload.dao;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fanxuankai.boot.upload.domain.WriteItem;

/**
 * @author fanxuankai
 */
public interface WriteItemDao extends IService<WriteItem> {
    /**
     * 任务写出的项目数
     *
     * @param jobId 任务
     * @return /
     */
    default int count(long jobId) {
        return count(Wrappers.lambdaQuery(WriteItem.class).eq(WriteItem::getJobId, jobId));
    }
}
